FBL.ns(function() { with (FBL) {

function ui_elementPanel() {}

ui_elementPanel.prototype = extend(Firebug.Panel,
{
    name: "ui_element",
    title: "UI Element",

    initialize: function() {
        Firebug.Panel.initialize.apply(this, arguments);
        alert('One-time UI Element extension init done.');
    }

});



Firebug.ui_elementModel = extend(Firebug.Module,
{
    showPanel: function(browser, panel) {
        var isui_elementPanel = panel && panel.name == "ui_element";
        var ui_elementButtons = browser.chrome.$("fbui_elementButtons");
        collapse(ui_elementButtons, !isui_elementPanel);

        if (!isui_elementPanel) return;

        var doc = panel.document;
        var ui_element_div = panel.panelNode;

        if (!this.initialized) {
            var t = doc.createTextNode('I am the UI Element extension and I approved this message.');
            ui_element_div.appendChild(t);
            this.initialized = true;
        }

    },

    onAboutButton: function(context) {
        alert("UI Element extension by Nathan Peckham; http://www.example.org");
    }
});



Firebug.registerPanel(ui_elementPanel);
Firebug.registerModule(Firebug.ui_elementModel);

}});